using System.ComponentModel.DataAnnotations;

namespace FServer.Core.Entities;

public class User
{
    public Guid Id { get; set; }
    
    [Required]
    [MaxLength(50)]
    public string Username { get; set; } = string.Empty;
    
    [Required]
    [MaxLength(100)]
    public string Email { get; set; } = string.Empty;
    
    [Required]
    [MaxLength(255)]
    public string PasswordHash { get; set; } = string.Empty;
    
    [Required]
    [MaxLength(255)]
    public string Salt { get; set; } = string.Empty;
    
    [MaxLength(20)]
    public string Role { get; set; } = "Player";
    
    [MaxLength(20)]
    public string Status { get; set; } = "Active";
    
    public bool EmailVerified { get; set; } = false;
    
    public DateTime? LastLoginAt { get; set; }
    
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
    
    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
    
    public int Version { get; set; } = 1;
}
